﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<qlqa.Models.Form.OrderForm.OrderForm>" %>
<%@ Import Namespace="qlqa.Delegate.CommonDelegate" %>

<% var commonDelegate = new CommonDelegate(); %>

<% if (Model.HoaDon != null)
{
    if (Model.ListChiTietHoaDon != null && Model.ListChiTietHoaDon.Any())
    {
        int stt = 1;
        foreach (var item in Model.ListChiTietHoaDon)
        {
%>
<tr>
<td>
    <%= stt %>
</td>
<td>
    <%= commonDelegate.GetTenMonAn(item.IdMon) %>
</td>
<td>
    <input type="text" id="SoLuongDaDat<%= item.Id %>" value="<%= item.SoLuong %>" style="width: 35px;"/>
</td>
<td>
    <%= item.Gia %>
</td>
<td>
    <input type="hidden" id="IdChiTiet<%= item.Id %>" value="<%= item.Id %>" name="IdChiTiet"/>
    <input type="text" id="GiaThuc<%= item.Id %>" value="<%= item.GiaThuc %>" style="width: 60px;"/>
</td>
<td>
    <span class="glyphicons glyphicons-circle_remove" style="color:red;cursor: pointer" onclick="XoaMonAjax(<%= item.Id %>);"></span>
</td>
</tr>
<%
stt++;
            }
        }
    } %>
                               
<tr>
    <td></td>
    <td colspan="3">Thành tiền</td>
    <td><b><%= Model.HoaDon != null ? Model.HoaDon.ThanhTien.ToString() : string.Empty %></b></td>
</tr>